import {Role} from "~/resource/types/role/role";
import {Category} from "~/resource/types/common/category";

export default defineWrappedHandler(async (event) => {
    const formData =  getQuery(event);
    const categoryId=!formData.categoryId?0:formData.categoryId as number;
    return {
        code: "000000",
        message: "success",
        data: [
            new Role("角色1"+categoryId, "001", 1+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色2"+categoryId, "002", 2+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色3"+categoryId, "002", 3+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色4"+categoryId, "002", 4+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色5"+categoryId, "002", 5+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色6"+categoryId, "002", 6+categoryId,new Category("分类1","0001",categoryId)),
            new Role("角色7"+categoryId, "002", 7+categoryId,new Category("分类1","0001",categoryId))
        ]
    };

});
